{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import _pickle as cPickle"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 读取推荐列表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "defaultdict(dict,\n",
       "            {'australia': {0: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              1: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              2: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              3: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              4: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              5: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067']},\n",
       "             'canada': {0: ['0440215625',\n",
       "               '0060928336',\n",
       "               '0812511816',\n",
       "               '0140293248',\n",
       "               '0676973779',\n",
       "               '0312291639',\n",
       "               '0156007754',\n",
       "               '0375727345',\n",
       "               '0316601950',\n",
       "               '0440226430',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101'],\n",
       "              1: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              2: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              3: ['0679781587',\n",
       "               '0553578685',\n",
       "               '0553296981',\n",
       "               '0671011375',\n",
       "               '0676974805',\n",
       "               '0770422632',\n",
       "               '0684874350',\n",
       "               '0312924585',\n",
       "               '0385484518',\n",
       "               '0451155750',\n",
       "               '0385730586',\n",
       "               '0743436210',\n",
       "               '0440211727',\n",
       "               '034538475X',\n",
       "               '0394223802',\n",
       "               '059035342X',\n",
       "               '0060987561',\n",
       "               '0385335881',\n",
       "               '0345313860',\n",
       "               '0671021001',\n",
       "               '0330267388',\n",
       "               '0553572997',\n",
       "               '0064400018',\n",
       "               '0140067477',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695'],\n",
       "              4: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              5: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067']},\n",
       "             'france': {0: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              2: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              3: ['2070360024',\n",
       "               '2253033138',\n",
       "               '225313922X',\n",
       "               '2253005274',\n",
       "               '2253150711',\n",
       "               '2070408507',\n",
       "               '2070394727',\n",
       "               '202025462X',\n",
       "               '2253140503',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597'],\n",
       "              4: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              5: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067']},\n",
       "             'germany': {0: ['3596144868',\n",
       "               '3423105410',\n",
       "               '3257229534',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207'],\n",
       "              1: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              2: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              3: ['3423204206',\n",
       "               '3442414199',\n",
       "               '3423011505',\n",
       "               '3518368540',\n",
       "               '3150000017',\n",
       "               '3499224623',\n",
       "               '3453210697',\n",
       "               '3453007867',\n",
       "               '3492222463',\n",
       "               '3453071174',\n",
       "               '3404148665',\n",
       "               '3442439736',\n",
       "               '3423084049',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227'],\n",
       "              4: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              5: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067']},\n",
       "             'italy': {0: ['8826703132',\n",
       "               '8804342838',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499'],\n",
       "              2: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              3: ['8817106100',\n",
       "               '8804390727',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499'],\n",
       "              4: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067']},\n",
       "             'n/a': {0: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067']},\n",
       "             'other': {0: ['0446310786',\n",
       "               '059035342X',\n",
       "               '067976402X',\n",
       "               '0440226430',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695'],\n",
       "              1: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              2: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              3: ['0439064864',\n",
       "               '0439136369',\n",
       "               '0140620338',\n",
       "               '043935806X',\n",
       "               '0060987103',\n",
       "               '0441000916',\n",
       "               '0385504209',\n",
       "               '0439139600',\n",
       "               '0070212570',\n",
       "               '0062502182',\n",
       "               '034538475X',\n",
       "               '0425152251',\n",
       "               '0552142379',\n",
       "               '0060930535',\n",
       "               '0385498802',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X'],\n",
       "              4: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              5: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067']},\n",
       "             'portugal': {0: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              2: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              3: ['9726106141',\n",
       "               '9727722458',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499'],\n",
       "              4: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              5: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067']},\n",
       "             'spain': {0: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              2: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              3: ['8445071777',\n",
       "               '846630679X',\n",
       "               '8445071416',\n",
       "               '8423309835',\n",
       "               '8483101610',\n",
       "               '840149186X',\n",
       "               '0060510323',\n",
       "               '0316666343',\n",
       "               '8420725927',\n",
       "               '8420441708',\n",
       "               '0553274503',\n",
       "               '8495618605',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350'],\n",
       "              4: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              5: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067']},\n",
       "             'united kingdom': {0: ['0749397543',\n",
       "               '0552996009',\n",
       "               '0330367358',\n",
       "               '0099771519',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695'],\n",
       "              1: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              2: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              3: ['0749391308',\n",
       "               '1844262553',\n",
       "               '0786867647',\n",
       "               '0007110928',\n",
       "               '0140279288',\n",
       "               '000649840X',\n",
       "               '0575400951',\n",
       "               '0749305401',\n",
       "               '0330262130',\n",
       "               '1853261580',\n",
       "               '0552134643',\n",
       "               '0749309423',\n",
       "               '0060392452',\n",
       "               '0552996009',\n",
       "               '034911675X',\n",
       "               '0552131067',\n",
       "               '0552140295',\n",
       "               '0552124753',\n",
       "               '0099747200',\n",
       "               '0552142352',\n",
       "               '1860461670',\n",
       "               '0156027321',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499'],\n",
       "              4: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              5: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067']},\n",
       "             'usa': {0: ['0393312836',\n",
       "               '0375400117',\n",
       "               '0312265840',\n",
       "               '006104444X',\n",
       "               '0767903382',\n",
       "               '0439064864',\n",
       "               '0688170528',\n",
       "               '0517122707',\n",
       "               '0425174484',\n",
       "               '0805019359',\n",
       "               '0887307876',\n",
       "               '0740704818',\n",
       "               '0440215625',\n",
       "               '0671705091',\n",
       "               '0440235502',\n",
       "               '0679723161',\n",
       "               '0439136350',\n",
       "               '014100018X',\n",
       "               '0449911519',\n",
       "               '0525946233',\n",
       "               '0689710682',\n",
       "               '0385318073',\n",
       "               '0684826976',\n",
       "               '0345310020',\n",
       "               '0061000027',\n",
       "               '0316182540',\n",
       "               '0316154059',\n",
       "               '0553571656',\n",
       "               '0590353403',\n",
       "               '0671776134',\n",
       "               '0671026011',\n",
       "               '042516828X',\n",
       "               '0671014188',\n",
       "               '0316779490',\n",
       "               '0684801051',\n",
       "               '0440127793',\n",
       "               '0743227441',\n",
       "               '0679426159',\n",
       "               '0440439884',\n",
       "               '0385510438',\n",
       "               '0805063889',\n",
       "               '0440414857',\n",
       "               '0451191153',\n",
       "               '0380702843',\n",
       "               '0786808551',\n",
       "               '0385472943',\n",
       "               '0553284118',\n",
       "               '0446391301',\n",
       "               '1558744630',\n",
       "               '0670894605',\n",
       "               '0446519138',\n",
       "               '0441627404',\n",
       "               '0440236169',\n",
       "               '0375411550',\n",
       "               '0060096195',\n",
       "               '0440110653',\n",
       "               '1573229083',\n",
       "               '0446670251',\n",
       "               '0345339681',\n",
       "               '0451204530',\n",
       "               '0156005891',\n",
       "               '0440219078',\n",
       "               '043935806X',\n",
       "               '0345436911',\n",
       "               '038533558X',\n",
       "               '0743467523',\n",
       "               '0553550039',\n",
       "               '0486270629',\n",
       "               '0671727796',\n",
       "               '0142001430',\n",
       "               '0156711427',\n",
       "               '0380730820',\n",
       "               '0812570944',\n",
       "               '0679734775',\n",
       "               '0156007754',\n",
       "               '0385472951',\n",
       "               '0140042520',\n",
       "               '0141301155',\n",
       "               '0399148450',\n",
       "               '0345430573',\n",
       "               '0061092177',\n",
       "               '0767905385',\n",
       "               '0140177396',\n",
       "               '0671693816',\n",
       "               '0743211235',\n",
       "               '0446670111',\n",
       "               '0064401847',\n",
       "               '0060959037',\n",
       "               '0312966970',\n",
       "               '0385720955',\n",
       "               '0553375407',\n",
       "               '0312099436',\n",
       "               '0345435796',\n",
       "               '0439139597',\n",
       "               '0385420161',\n",
       "               '0310209307',\n",
       "               '0312421273',\n",
       "               '0064400042',\n",
       "               '0142004235',\n",
       "               '0440967694',\n",
       "               '034541389X',\n",
       "               '0375506276',\n",
       "               '0671016776',\n",
       "               '055357258X',\n",
       "               '0440236053',\n",
       "               '0786868716',\n",
       "               '0345348036',\n",
       "               '068484477X',\n",
       "               '0515132020',\n",
       "               '0553291955',\n",
       "               '0380001411',\n",
       "               '055310666X',\n",
       "               '0786889608',\n",
       "               '0446611085',\n",
       "               '0316678104',\n",
       "               '067162461X',\n",
       "               '0312971842',\n",
       "               '0345369947',\n",
       "               '0440343194',\n",
       "               '0060922249',\n",
       "               '0688177867',\n",
       "               '0399146253',\n",
       "               '0345413350',\n",
       "               '0553107305',\n",
       "               '0375500510',\n",
       "               '0064471101',\n",
       "               '0440204194',\n",
       "               '0312205406',\n",
       "               '039914465X',\n",
       "               '0061093335',\n",
       "               '0743411269',\n",
       "               '0446520802',\n",
       "               '0451191145',\n",
       "               '0446359866',\n",
       "               '0515131210',\n",
       "               '0142000361',\n",
       "               '081297106X',\n",
       "               '0486284999',\n",
       "               '0553292722',\n",
       "               '0805062971',\n",
       "               '0767903579',\n",
       "               '0312990456',\n",
       "               '0842329250',\n",
       "               '0553573926',\n",
       "               '0345423135',\n",
       "               '0440166497',\n",
       "               '067091021X',\n",
       "               '0740723367',\n",
       "               '0399150897',\n",
       "               '0590371258',\n",
       "               '0684195984',\n",
       "               '0380820846',\n",
       "               '0553583611',\n",
       "               '0842329218',\n",
       "               '0449005615',\n",
       "               '0312275420',\n",
       "               '0684803968',\n",
       "               '055314300X',\n",
       "               '0451524934',\n",
       "               '0684801523',\n",
       "               '0446527033',\n",
       "               '0515128554',\n",
       "               '0345417976',\n",
       "               '0380792745',\n",
       "               '0345433491',\n",
       "               '0425179885',\n",
       "               '1558743669',\n",
       "               '0553582127',\n",
       "               '0312195516',\n",
       "               '0515130966',\n",
       "               '0679781587',\n",
       "               '0060930535',\n",
       "               '0385721420',\n",
       "               '0826308791',\n",
       "               '0452269571',\n",
       "               '0743437802',\n",
       "               '0380717018',\n",
       "               '0515131229',\n",
       "               '006440630X',\n",
       "               '0440223016',\n",
       "               '0553575104',\n",
       "               '055321330X',\n",
       "               '0440224594',\n",
       "               '0743204077',\n",
       "               '0345404793',\n",
       "               '0060964049',\n",
       "               '0446677450',\n",
       "               '0399134409',\n",
       "               '0061020400',\n",
       "               '0865471185',\n",
       "               '0380721643',\n",
       "               '0671729411',\n",
       "               '0515132187',\n",
       "               '0060987103',\n",
       "               '0316666343',\n",
       "               '0439136369',\n",
       "               '0316969680',\n",
       "               '0151008116',\n",
       "               '0345416260',\n",
       "               '059035342X',\n",
       "               '0385722206',\n",
       "               '0553289691',\n",
       "               '0061097314',\n",
       "               '0452281725',\n",
       "               '0060914653',\n",
       "               '0446531332',\n",
       "               '0140254544',\n",
       "               '0312966091',\n",
       "               '0553272535',\n",
       "               '155874262X',\n",
       "               '0316089699',\n",
       "               '0679736042',\n",
       "               '0553574639',\n",
       "               '0679457313',\n",
       "               '0425163385',\n",
       "               '0316789844',\n",
       "               '0140185216',\n",
       "               '0425182878',\n",
       "               '0316602906',\n",
       "               '0345342968',\n",
       "               '044023512X',\n",
       "               '0345339738',\n",
       "               '0786863986',\n",
       "               '0345384369',\n",
       "               '0399150439',\n",
       "               '1551665301',\n",
       "               '0451149513',\n",
       "               '0425081818',\n",
       "               '0786819146',\n",
       "               '0842329277',\n",
       "               '0345348109',\n",
       "               '0060936363',\n",
       "               '080411935X',\n",
       "               '0807083054',\n",
       "               '0440212723',\n",
       "               '0446525537',\n",
       "               '0060392452',\n",
       "               '0425107469'],\n",
       "              1: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067'],\n",
       "              2: ['0380778556',\n",
       "               '0439064864',\n",
       "               '0345339681',\n",
       "               '0394820371',\n",
       "               '0812550706',\n",
       "               '0440229499',\n",
       "               '0446310786',\n",
       "               '0064407055',\n",
       "               '0345339703',\n",
       "               '0440498058',\n",
       "               '0064472795',\n",
       "               '0142000981',\n",
       "               '0440219078',\n",
       "               '0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227'],\n",
       "              3: ['0553213695',\n",
       "               '0345352661',\n",
       "               '0515134481',\n",
       "               '0811802981',\n",
       "               '140003180X',\n",
       "               '0345384210',\n",
       "               '0449232921',\n",
       "               '0345450892',\n",
       "               '0439425220',\n",
       "               '0836218787',\n",
       "               '0743411358',\n",
       "               '0345322231',\n",
       "               '0446677450',\n",
       "               '0451191137',\n",
       "               '0525946284',\n",
       "               '0553294385',\n",
       "               '0385199570',\n",
       "               '0064407691',\n",
       "               '0684801221',\n",
       "               '034543014X',\n",
       "               '042507160X',\n",
       "               '0440904196',\n",
       "               '0670835382',\n",
       "               '0452274427',\n",
       "               '0374525641',\n",
       "               '0553348981',\n",
       "               '0060248025',\n",
       "               '0451167716',\n",
       "               '0060256672',\n",
       "               '0758200862',\n",
       "               '0671722859',\n",
       "               '0590353403',\n",
       "               '0385335679',\n",
       "               '0553379011',\n",
       "               '0836218981',\n",
       "               '0440158532',\n",
       "               '0836218051',\n",
       "               '0316693294',\n",
       "               '0836218353',\n",
       "               '0345335465',\n",
       "               '0385482388',\n",
       "               '0140185232',\n",
       "               '0060254920',\n",
       "               '0385315031',\n",
       "               '0743424107',\n",
       "               '059030271X',\n",
       "               '0440222028',\n",
       "               '0451456718',\n",
       "               '0875421180',\n",
       "               '0440343194',\n",
       "               '1558506462',\n",
       "               '0373802021',\n",
       "               '0440220653',\n",
       "               '0590371258',\n",
       "               '0140258795',\n",
       "               '0553283685',\n",
       "               '0446601977',\n",
       "               '0060175966',\n",
       "               '0767905172',\n",
       "               '0679879250',\n",
       "               '0505523892',\n",
       "               '038542471X',\n",
       "               '0553379658',\n",
       "               '0446353957',\n",
       "               '0060809833',\n",
       "               '0812533054',\n",
       "               '0393312836',\n",
       "               '0380718758',\n",
       "               '038533348X',\n",
       "               '0440401585',\n",
       "               '055321330X',\n",
       "               '0060096195',\n",
       "               '0448060191',\n",
       "               '1400032717',\n",
       "               '0312050631',\n",
       "               '0441172717',\n",
       "               '0316899992',\n",
       "               '0743247612',\n",
       "               '0842332286',\n",
       "               '0375701214',\n",
       "               '0373250223',\n",
       "               '0553573314',\n",
       "               '0439064864',\n",
       "               '0393312801',\n",
       "               '0425182878',\n",
       "               '0140282033',\n",
       "               '0671744577',\n",
       "               '0679459618',\n",
       "               '051770739X',\n",
       "               '0064471055',\n",
       "               '038548951X',\n",
       "               '043936213X',\n",
       "               '0373872127',\n",
       "               '0679775439',\n",
       "               '0425129586',\n",
       "               '0451210158',\n",
       "               '039914787X',\n",
       "               '0812575717',\n",
       "               '043935806X',\n",
       "               '0812550706',\n",
       "               '0439139597',\n",
       "               '0439136369',\n",
       "               '0441008615',\n",
       "               '0517693119',\n",
       "               '0743211383',\n",
       "               '0385729332',\n",
       "               '0446600253',\n",
       "               '084233226X',\n",
       "               '0553289691',\n",
       "               '0553380958',\n",
       "               '0671034006',\n",
       "               '0380752859',\n",
       "               '0060935464',\n",
       "               '0441005748',\n",
       "               '052594527X',\n",
       "               '0064471063',\n",
       "               '0451526341',\n",
       "               '0312423799',\n",
       "               '0252006860',\n",
       "               '0380752867',\n",
       "               '0451169514',\n",
       "               '0671250671',\n",
       "               '0765342987',\n",
       "               '0380753014',\n",
       "               '0451197364',\n",
       "               '0345318854',\n",
       "               '0446527033',\n",
       "               '0451166361',\n",
       "               '0425130215',\n",
       "               '0380802325',\n",
       "               '0670813028',\n",
       "               '0842329277',\n",
       "               '0451526562',\n",
       "               '0345347536',\n",
       "               '0142000221',\n",
       "               '0451523350',\n",
       "               '0060934913',\n",
       "               '0385474547',\n",
       "               '0553242954',\n",
       "               '0618002219',\n",
       "               '1592400876',\n",
       "               '006017143X',\n",
       "               '0836213319',\n",
       "               '0441790348',\n",
       "               '0743437802',\n",
       "               '037541309X',\n",
       "               '0439136350',\n",
       "               '0393050939',\n",
       "               '0064401847',\n",
       "               '0156528207',\n",
       "               '0451207521',\n",
       "               '0553573985',\n",
       "               '034530988X',\n",
       "               '0446352764',\n",
       "               '0515133086',\n",
       "               '0451408462',\n",
       "               '0380729342',\n",
       "               '0767902513',\n",
       "               '0886773784',\n",
       "               '0312990456',\n",
       "               '0590406205',\n",
       "               '0316153990',\n",
       "               '0316107352',\n",
       "               '0393317552',\n",
       "               '0385421982',\n",
       "               '0553268449',\n",
       "               '0553375407',\n",
       "               '0375506039',\n",
       "               '0394820371',\n",
       "               '0671746065',\n",
       "               '0452279178',\n",
       "               '0399145990',\n",
       "               '0156005891',\n",
       "               '0345442822',\n",
       "               '0395977894',\n",
       "               '0553262580',\n",
       "               '0060981180',\n",
       "               '051513175X',\n",
       "               '0618129022',\n",
       "               '0380716542',\n",
       "               '0375400117',\n",
       "               '0380001411',\n",
       "               '0441007147',\n",
       "               '0140374248',\n",
       "               '0679805273',\n",
       "               '0399148248',\n",
       "               '0440431808',\n",
       "               '0060507845',\n",
       "               '0373250274',\n",
       "               '1558746099',\n",
       "               '1579546463',\n",
       "               '0060234814',\n",
       "               '0345272587',\n",
       "               '1573222259',\n",
       "               '034543739X',\n",
       "               '0060927569',\n",
       "               '0345301870',\n",
       "               '0743225082',\n",
       "               '0140143505',\n",
       "               '0451524934',\n",
       "               '0446391301',\n",
       "               '0805062971',\n",
       "               '1880418568',\n",
       "               '0345409469',\n",
       "               '0345366239',\n",
       "               '0515135216',\n",
       "               '1853260010',\n",
       "               '0394558235',\n",
       "               '0385335180',\n",
       "               '0671025341',\n",
       "               '0553208845',\n",
       "               '0316182540',\n",
       "               '1931561648',\n",
       "               '0316769509',\n",
       "               '0670839531',\n",
       "               '051511779X',\n",
       "               '0375725849',\n",
       "               '0380709562',\n",
       "               '0670272663',\n",
       "               '0312962452',\n",
       "               '0440901588',\n",
       "               '0425188361',\n",
       "               '0804108412',\n",
       "               '0684818868',\n",
       "               '0778320480',\n",
       "               '014017737X',\n",
       "               '0874778883',\n",
       "               '0671776096',\n",
       "               '0060930934',\n",
       "               '0140133488',\n",
       "               '0380868768',\n",
       "               '0452272319',\n",
       "               '0843948507',\n",
       "               '0679410325',\n",
       "               '0671742558',\n",
       "               '0374199698',\n",
       "               '0877017883',\n",
       "               '0446520802',\n",
       "               '0688170528',\n",
       "               '0060391626',\n",
       "               '084232920X',\n",
       "               '0316666009',\n",
       "               '0618526412',\n",
       "               '0515103292',\n",
       "               '0441001971',\n",
       "               '0440226686',\n",
       "               '0440145465',\n",
       "               '0671415085',\n",
       "               '0451163966',\n",
       "               '0446310786',\n",
       "               '0553575023',\n",
       "               '0425179672',\n",
       "               '0553571583',\n",
       "               '0446532452',\n",
       "               '0394800133',\n",
       "               '068487217X',\n",
       "               '0553210793',\n",
       "               '039480001X',\n",
       "               '0385418493',\n",
       "               '0553573861',\n",
       "               '0671461494',\n",
       "               '0451524667',\n",
       "               '0836220498',\n",
       "               '0312274920',\n",
       "               '038531258X',\n",
       "               '0060929790',\n",
       "               '0374270325',\n",
       "               '0425105334',\n",
       "               '0805063889',\n",
       "               '0312422156',\n",
       "               '0373196636',\n",
       "               '0345260791',\n",
       "               '0060256737',\n",
       "               '044021985X',\n",
       "               '0812532635',\n",
       "               '0520204956',\n",
       "               '0811811409',\n",
       "               '1878424319',\n",
       "               '067102535X',\n",
       "               '0671496174',\n",
       "               '1551668017',\n",
       "               '0425152499',\n",
       "               '140005446X',\n",
       "               '075820230X',\n",
       "               '0802138004',\n",
       "               '0553582909',\n",
       "               '0060557257',\n",
       "               '1573229083',\n",
       "               '0765343436',\n",
       "               '0553210416',\n",
       "               '0345334310',\n",
       "               '0373833458',\n",
       "               '0451165209',\n",
       "               '067165831X',\n",
       "               '0440405483',\n",
       "               '038073186X',\n",
       "               '0060096209',\n",
       "               '0670892742',\n",
       "               '0684802988',\n",
       "               '0679426140',\n",
       "               '014038572X',\n",
       "               '1558744630',\n",
       "               '0062502174',\n",
       "               '0440229499',\n",
       "               '0451525884',\n",
       "               '0345442768',\n",
       "               '0449219461',\n",
       "               '0316143464',\n",
       "               '0743206029',\n",
       "               '0375756981',\n",
       "               '0446603422',\n",
       "               '0451628039',\n",
       "               '076790382X',\n",
       "               '0399143947',\n",
       "               '0441004520',\n",
       "               '0140042598',\n",
       "               '0802130208',\n",
       "               '0345339703',\n",
       "               '0380756293',\n",
       "               '0373790651',\n",
       "               '067187750X',\n",
       "               '0385490445',\n",
       "               '0375507493',\n",
       "               '0345305183',\n",
       "               '0345358805',\n",
       "               '0756400619',\n",
       "               '0380816555',\n",
       "               '0679729798',\n",
       "               '0671733893',\n",
       "               '0671729454',\n",
       "               '076791404X',\n",
       "               '0425101452',\n",
       "               '0671640453',\n",
       "               '0425181111',\n",
       "               '0671702513',\n",
       "               '0553258524',\n",
       "               '0440224721',\n",
       "               '0505523752',\n",
       "               '0446516317',\n",
       "               '0451160916',\n",
       "               '0451162072',\n",
       "               '0312289510',\n",
       "               '0886777631',\n",
       "               '0891075275',\n",
       "               '0932379516',\n",
       "               '0066212855',\n",
       "               '140003339X',\n",
       "               '0812544501',\n",
       "               '0553572490',\n",
       "               '0451523024',\n",
       "               '0452279488',\n",
       "               '0553373803',\n",
       "               '0440487617',\n",
       "               '1573229628',\n",
       "               '0812510992',\n",
       "               '0553258559',\n",
       "               '006000438X',\n",
       "               '0553211765',\n",
       "               '0440241413',\n",
       "               '0843949945',\n",
       "               '0515127396',\n",
       "               '0517580497'],\n",
       "              4: ['0670894605',\n",
       "               '080411935X',\n",
       "               '0671038184',\n",
       "               '0553250531',\n",
       "               '0142001430',\n",
       "               '0425166929',\n",
       "               '0671042262',\n",
       "               '0451197038',\n",
       "               '0316153915',\n",
       "               '0385505833',\n",
       "               '0743227441',\n",
       "               '0451207521',\n",
       "               '0385420161',\n",
       "               '0553574574',\n",
       "               '0449005615',\n",
       "               '0375412530',\n",
       "               '038572179X',\n",
       "               '0316603287',\n",
       "               '039592720X',\n",
       "               '0743486226',\n",
       "               '0553287346',\n",
       "               '0345362721',\n",
       "               '0385490992',\n",
       "               '0515136530',\n",
       "               '0553580221',\n",
       "               '0064400557',\n",
       "               '039914563X',\n",
       "               '0345384350',\n",
       "               '0446611921',\n",
       "               '1558745017',\n",
       "               '0385503822',\n",
       "               '0515131083',\n",
       "               '0142004235',\n",
       "               '0515136557',\n",
       "               '0525947299',\n",
       "               '0446667900',\n",
       "               '0874776945',\n",
       "               '0679425268',\n",
       "               '0439064872',\n",
       "               '0553801929',\n",
       "               '0439136350',\n",
       "               '0312195516',\n",
       "               '0679444815',\n",
       "               '0805063897',\n",
       "               '0743203631',\n",
       "               '0345423291',\n",
       "               '0425188809',\n",
       "               '052594527X',\n",
       "               '0671041789',\n",
       "               '0767905385',\n",
       "               '1592400876',\n",
       "               '0767902521',\n",
       "               '0316781142',\n",
       "               '0446516570',\n",
       "               '0316789089',\n",
       "               '0380820145',\n",
       "               '0439136369',\n",
       "               '0671519816',\n",
       "               '0446519804',\n",
       "               '038531292X',\n",
       "               '0375726349',\n",
       "               '0446610038',\n",
       "               '0380725835',\n",
       "               '043935806X',\n",
       "               '0553272535',\n",
       "               '0590353403',\n",
       "               '0061000175',\n",
       "               '0316666009',\n",
       "               '038079487X',\n",
       "               '0060392452',\n",
       "               '0385498802',\n",
       "               '0385510438',\n",
       "               '0142001740',\n",
       "               '0316969680',\n",
       "               '0151008116',\n",
       "               '0451179803',\n",
       "               '0316154059',\n",
       "               '0425178951',\n",
       "               '0446679593',\n",
       "               '0553584480',\n",
       "               '0312421273',\n",
       "               '0399143947',\n",
       "               '0385508042',\n",
       "               '0515090506',\n",
       "               '0425190641',\n",
       "               '0553580388',\n",
       "               '0451208080',\n",
       "               '0060504110',\n",
       "               '0670032379',\n",
       "               '0061030597',\n",
       "               '0345447867',\n",
       "               '0786868716',\n",
       "               '0385721420',\n",
       "               '0425183971',\n",
       "               '0440998050',\n",
       "               '140003065X',\n",
       "               '0449223604',\n",
       "               '0385493800',\n",
       "               '0449002985',\n",
       "               '0609610597',\n",
       "               '0425168298',\n",
       "               '0316782505',\n",
       "               '1400031354',\n",
       "               '0446670251',\n",
       "               '0446530891',\n",
       "               '0310205719',\n",
       "               '0679746048',\n",
       "               '0425121259',\n",
       "               '0743436210',\n",
       "               '0446531332',\n",
       "               '0671525743',\n",
       "               '015602943X',\n",
       "               '0451207645',\n",
       "               '1551668912',\n",
       "               '0140254544',\n",
       "               '0743437802',\n",
       "               '0060580275',\n",
       "               '0802139256',\n",
       "               '0553578022',\n",
       "               '081297106X',\n",
       "               '0805059555',\n",
       "               '0399149155',\n",
       "               '0452264464',\n",
       "               '067102535X',\n",
       "               '0375413634'],\n",
       "              5: ['0590353403',\n",
       "               '0446677450',\n",
       "               '0439064864',\n",
       "               '0439136369',\n",
       "               '043935806X',\n",
       "               '0740704818',\n",
       "               '0618002227',\n",
       "               '0439136350',\n",
       "               '0060175966',\n",
       "               '0064471101',\n",
       "               '0439139597',\n",
       "               '0316154059',\n",
       "               '0679775439',\n",
       "               '0393317552',\n",
       "               '0553573403',\n",
       "               '0553213695',\n",
       "               '0156528207',\n",
       "               '0440229499',\n",
       "               '0894808249',\n",
       "               '0552131067']}})"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "feature_recommand = cPickle.load(open('./data/feature_recommand.pkl','rb'))\n",
    "feature_recommand"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 导入测试集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>location</th>\n",
       "      <th>age</th>\n",
       "      <th>item_id</th>\n",
       "      <th>rating</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>109814</th>\n",
       "      <td>27462</td>\n",
       "      <td>usa</td>\n",
       "      <td>0</td>\n",
       "      <td>1587492695</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>561359</th>\n",
       "      <td>137190</td>\n",
       "      <td>france</td>\n",
       "      <td>3</td>\n",
       "      <td>0552997234</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>182843</th>\n",
       "      <td>42721</td>\n",
       "      <td>canada</td>\n",
       "      <td>3</td>\n",
       "      <td>0671024108</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>854047</th>\n",
       "      <td>208829</td>\n",
       "      <td>canada</td>\n",
       "      <td>0</td>\n",
       "      <td>0140503897</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>559003</th>\n",
       "      <td>136348</td>\n",
       "      <td>usa</td>\n",
       "      <td>4</td>\n",
       "      <td>0807220299</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        user_id location  age     item_id  rating\n",
       "109814    27462      usa    0  1587492695       0\n",
       "561359   137190   france    3  0552997234       8\n",
       "182843    42721   canada    3  0671024108       8\n",
       "854047   208829   canada    0  0140503897       0\n",
       "559003   136348      usa    4  0807220299       9"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_data_text = cPickle.load(open('./data/df_data_text.pkl','rb'))\n",
    "df_data_text.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<bound method DataFrame.info of          user_id location  age     item_id  rating\n",
       "109814     27462      usa    0  1587492695       0\n",
       "561359    137190   france    3  0552997234       8\n",
       "182843     42721   canada    3  0671024108       8\n",
       "854047    208829   canada    0  0140503897       0\n",
       "559003    136348      usa    4  0807220299       9\n",
       "...          ...      ...  ...         ...     ...\n",
       "1064716   257025      usa    3  044022859X       9\n",
       "427486    104636      usa    0  0425127583       0\n",
       "1022650   246655      usa    0  0373706235       0\n",
       "22450       7346      usa    4  0449219399       0\n",
       "473426    115003      usa    3  0316780375       0\n",
       "\n",
       "[344931 rows x 5 columns]>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_data_text.info"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 处理location"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "top_location_s = list(feature_recommand.keys())\n",
    "df_data_text['location'] = df_data_text['location'].apply(lambda location:location if location in top_location_s else 'other')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "usa               230427\n",
       "canada             31331\n",
       "other              25235\n",
       "united kingdom     15239\n",
       "germany            11986\n",
       "australia           7873\n",
       "spain               7792\n",
       "france              4142\n",
       "n/a                 4097\n",
       "italy               3665\n",
       "portugal            3144\n",
       "Name: location, dtype: int64"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_data_text['location'].value_counts()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 得到准确率和召回率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "union_quantity = 0\n",
    "recommand_quantity = 0\n",
    "user_fav_quantity = 0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "for location,groupby_location in df_data_text.groupby('location'):\n",
    "    for age,groupby_location_age in groupby_location.groupby('age'):\n",
    "        for user_id,groupby_location_age_userid in groupby_location_age.groupby('user_id'):\n",
    "            items_rating = groupby_location_age_userid.groupby('item_id')['rating'].mean().sort_values(ascending = False)\n",
    "            user_fav_items = [\n",
    "                item_id\n",
    "                for item_id in items_rating.index if items_rating[item_id] >=5\n",
    "            ]\n",
    "            recommand_items = feature_recommand[location][age]\n",
    "            union_quantity +=len(\n",
    "                set(user_fav_items) & set(recommand_items)\n",
    "            )\n",
    "            recommand_quantity += len(recommand_items)\n",
    "            user_fav_quantity += len(user_fav_items)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
